import { request } from '../request'
export default {
  API_ORDER_HALL_POST(data = {}) {
    return request({
      url: `/api/order/orderhall`,
      method: 'post',
      data
    })
  },

  API_JIDAN_GET(data = {}) {
    return request({
      url: '/api/order/delivery',
      method: 'post',
      data
    })
  },
  API_COMEON_GET(data = {}) {
    return request({
      url: '/api/order/comeon',
      method: 'post',
      data
    })
  },
  API_JIDAN_DETAIL_GET(data = {}) {
    return request({
      url: '/api/order/detail',
      method: 'post',
      data
    })
  },
  API_ORDER_LIST(data = {}) {
    return request({
      url: '/api/order/list',
      method: 'post',
      data
    })
  },

  // 文件上传接口
  API_UPLOAD_FILE(data = {}) {
    return request({
      url: '/api/index/upload',
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },

  API_TIANXIEXL_LIST(data = {}) {
    return request({
      url: '/api/order/confirm',
      method: 'post',
      data
    })
  },
  API_FEEDBACK_LIST(data = {}) {
    return request({
      url: '/api/member/feedback',
      method: 'post',
      data
    })
  },
  API_APPVERSION_LIST(params = {}) {
    return request({
      url: '/api/index/appversion',
      method: 'get',
      params,
      headers: {}
    })
  },
  API_MEMBER_INFO(data = {}) {
    return request({
      url: '/api/member/info',
      method: 'post',
      data
    })
  },
  API_MEMBER_SAVE(data = {}) {
    return request({
      url: '/api/member/profile',
      method: 'post',
      data
    })
  },
  API_SMS_SEND(data = {}) {
    return request({
      url: '/api/sms/send',
      method: 'post',
      data,
      headers: {}
    })
  },
  API_UPDATE_PWD(data = {}) {
    return request({
      url: '/api/member/resetpwd',
      method: 'post',
      data,
      headers: {}
    })
  },
  API_MEMBER_SWITCH(data = {}) {
    return request({
      url: '/api/member/switch',
      method: 'post',
      data
    })
  },
  HOME_GOODS_LIST(data = {}) {
    return request({
      url: '/api/goods/list',
      method: 'post',
      data
    })
  },
  SUBMIT_ORDER(data = {}) {
    return request({
      url: '/api/order/create',
      method: 'post',
      data
    })
  },
  GET_ADRESS_LIST(data = {}) {
    return request({
      url: '/api/address/list',
      method: 'post',
      data
    })
  },
  DEL_ADRESS(data = {}) {
    return request({
      url: '/api/address/del',
      method: 'post',
      data
    })
  },
  GET_NOTICE_LIST(params = {}) {
    return request({
      url: '/api/index/notice',
      method: 'get',
      params,
      headers: {}
    })
  },
  GET_PHONE_LIST(params = {}) {
    return request({
      url: '/api/index/customer',
      method: 'get',
      params,
      headers: {}
    })
  },

  GET_ADRESS_DETAIL(data = {}) {
    return request({
      url: '/api/address/detail',
      method: 'post',
      data
    })
  },

  // 保存地址接口
  SAVE_ADDRESS(data = {}) {
    return request({
      url: '/api/address/edit',
      method: 'post',
      data
    })
  },
  ADD_ADDRESS(data = {}) {
    return request({
      url: '/api/address/add',
      method: 'post',
      data
    })
  },
  GET_ADRESS_AREA(data = {}) {
    return request({
      url: '/api/address/area',
      method: 'post',
      data,
      headers: {}
    })
  },
  
  // 取消订单接口
  API_CANCEL_ORDER(data = {}) {
    return request({
      url: '/api/order/cancel',
      method: 'post',
      data
    })
  },
  // 去支付
  API_ORDER_PAY(data = {}) {
    return request({
      url: '/api/order/pay',
      method: 'post',
      data
    })
  },
  GET_POSTER_IMG(data = {}) {
    return request({
      url: '/api/index/poster',
      method: 'post',
      data,
      headers: {}
    })
  },
  API_SUPPLIER_NAME(params = {}) {
    return request({
      url: '/api/index/suppliercarrier',
      method: 'get',
      params,
      headers: {}
    })
  },
  // 司机认证提交接口
  API_DRIVER_CERT_SUBMIT(data = {}) {
    return request({
      url: '/api/driverapply/apply',
      method: 'post',
      data
    })
  },
}
